package top.revery.task.util;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.stereotype.Component;
import top.revery.task.dto.LogPayUserService;
import top.revery.task.dto.TaskCompanyService;
import top.revery.task.dto.TaskKolService;
import top.revery.task.dto.TaskUserService;

import javax.annotation.PostConstruct;

/**
 * <h1> --- 服务访问映射 --- </h1>
 * Created by  revery.top jun
 * Date  2019-12-05 11:48
 */
@Component
public class FeignServiceMapping {

    /*
     * User Service
     * */
    public static TaskUserService taskUserService;
    public static TaskKolService taskKolService;
    public static TaskCompanyService taskCompanyService;
    public static  LogPayUserService logPayUserService;

    @Component
    public class AutoLoadData {
        @Autowired
        private TaskUserService taskUserService;
        @Autowired
        private TaskKolService taskKolService;
        @Autowired
        private TaskCompanyService taskCompanyService;
        @Autowired
        private  LogPayUserService logPayUserService;
        @PostConstruct
        void init() {
            FeignServiceMapping.taskUserService = this.taskUserService;
            FeignServiceMapping.taskKolService = this.taskKolService;
            FeignServiceMapping.taskCompanyService=this.taskCompanyService;
            FeignServiceMapping.logPayUserService=this.logPayUserService;
        }
    }
}
